<template>
	<view class="content">
		<button class="size" @tap="eventTrig">触发事件</button>
		<button class="size" @tap="eventDuration">精确持续事件</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				text: null
			}
		},
		methods: {
			eventTrig() {
				// 假设用的是google统计，则可以通过此方法添加事件追踪
				plus.statistic.eventTrig( "purchase", {"type":"book","quantity":"3"} );
			},
			eventDuration(){
				var d = 12000;
				plus.statistic.eventDuration("music", d, {"type":"popular","artist":"JJLin"});
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}

	.size {
		margin: 30rpx 0;
	}
</style>
